package run;

import com.SpringBootApps;
import lombok.extern.slf4j.Slf4j;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.springframework.context.support.GenericApplicationContext;
import org.springframework.messaging.handler.annotation.MessageMapping;
import utils.Utils;

@Slf4j
@SpringBootTest(classes = {StartUpForRSocketServer.Dummy.class},
        webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT)
public class StartUpForRSocketServer {
    Object lock = new Object();
    @Autowired
    GenericApplicationContext context;


    @Test
    public void verify() throws InterruptedException {

        Utils.print(context);
        synchronized (lock) {
            lock.wait();
        }
    }



    @Import(value = SpringBootApps.class)
    @Configuration
    public static class Dummy {

    }

}
